﻿using SmartAnswerPlatform.Common;
using SqlSugar;

namespace SmartAnswerPlatform.Models.ViewModels.Base
{
    public class BaseViewModel
    {
        /// <summary>
        /// 主键 自增长
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, Length = 32, ColumnDescription = "主键Id")]
        public string Id { get; set; } = IdGenerator.NextId();

        /// <summary>
        /// 是否删除
        /// </summary>
        [SugarColumn(ColumnDescription = "是否删除")]
        public bool? IsRemove { get; set; } = false;

        /// <summary>
        /// 创建人Id
        /// </summary>
        [SugarColumn(ColumnDescription = "创建人Id")]
        public string? CreateBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnDescription = "创建时间")]
        public DateTime? CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 修改人Id
        /// </summary>
        [SugarColumn(ColumnDescription = "修改人Id")]
        public string? updateBy { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        [SugarColumn(ColumnDescription = "修改时间")]
        public DateTime? updateTime { get; set; } = DateTime.Now;
    }
}